
#include "PCH.h"
#include "Color.h"

CByteColor::CByteColor(double _r,double _g, double _b)
{
	r = std::max(std::min(int(_r*255),255),0);
	g = std::max(std::min(int(_g*255),255),0);
	b = std::max(std::min(int(_b*255),255),0);


}

unsigned int CByteColor::RGB()
{
	unsigned int ReturnValue=0;
	ReturnValue +=r;
	ReturnValue <<= 8;
	ReturnValue +=g;
	ReturnValue <<= 8;
	ReturnValue +=b;
	return ReturnValue;
}

